using System.Web;
using AutoMapper;
using ilgolosone.Shared;

namespace ilgolosone.UI.Mappers
{
    public class HtmlEncoderFormatter : IValueFormatter
    {
        public string FormatValue(ResolutionContext context)
        {
            return HttpUtility.HtmlEncode(context.SourceValue.ToNullSafeString());
        }
    }
}